<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        input {
            border: 1px solid rgba(0, 0, 0, 0.8);
            text-align: right;
            font-size: 20px;
            font-weight: bold;
        }
    </style>
</head>
<body>
    minutes:<input type="text/css" value="0">
    seconds:<input type="text/css" value="0">
    <script>
        var minutesNode = document.getElementsByTagName('input')[0];
        var secondsNode = document.getElementsByTagName('input')[1];
        var minutes = 0,
            seconds = 0;
        var timer = setInterval(function () {
            seconds ++;
            if(seconds == 60) {
                seconds = 0;
                minutes ++;
            }
            secondsNode.value = seconds;
            minutesNode.value = minutes;
            if(minutes == 3) {
                clearInterval(timer);
            }
        },100)
    </script>
</body>
</html>